<?php
include 'baglanti.php';

$sql = "SELECT * FROM kisiler"; // kisiler: tablonuzun adı
$sonuc = $baglanti->query($sql);

if ($sonuc->num_rows > 0) {
    echo "<h2>Kayıtlı Kullanıcılar</h2>";
    echo "<table border='1' cellpadding='10'>
            <tr>
                <th>ID</th>
                <th>Ad</th>
                <th>Soyad</th>
                <th>Cinsiyet</th>
                <th>TC</th>
                <th>Yaş</th>
            </tr>";

    while($satir = $sonuc->fetch_assoc()) {
        echo "<tr>
                <td>".$satir["id"]."</td>
                <td>".$satir["ad"]."</td>
                <td>".$satir["soyad"]."</td>
                <td>".$satir["cinsiyet"]."</td>
                <td>".$satir["tc"]."</td>
                <td>".$satir["yas"]."</td>
              </tr>";
    }
    echo "</table>";
} else {
    echo "Hiç kayıt yok.";
}

$baglanti->close();
?>
